
package DBLayer;
import ModelLayer.Supplier;
import java.util.ArrayList;

/**
 * @version 12/22/2011
 * @author Gruppe 4
 */

public interface IFDBSupplier
{
    /**
     * Method to get all Suppliers from the database
     * @param retrieveAssociation
     * @return returns an ArrayList with Suppliers
     */
    public ArrayList<Supplier> getAllSuppliers(boolean retrieveAssociation);
    
    /**
     * Method to find a supplier with a specific id
     * @param supplierId int supplierId the id of the Supplier
     * @param retrieveAssociation
     * @return returns a Supplier Object 
     */
    public Supplier findSupplier(int supplierId, boolean retrieveAssociation);
    
    /**
     * Method to inser a Supplier into the database
     * @param supplier an Object of the type Supplier
     * @return returns an int 1 if the method succedes and -1 if the method fails
     */
    public int insertSupplier(Supplier supplier);
    
    /**
     * Method to update a supplier in the database;
     * @param supplier an Object of the type Supplier
     * @return returns an int 1 if the method succedes and -1 if the method fails
     */
    public int updateSupplier(Supplier supplier);
    
    /**
     * Method to delete a supplier from the database
     * @param supplierId int supplierId the id of the Supplier
     * @return returns an int 1 if the method succedes and -1 if the method fails
     */
    public int deleteSupplier(int supplierId);
}